﻿using System;
using System.Globalization;
using System.Windows.Data;

// This namespaces contains all the converts for this project

namespace TheCollectiveNetwork.Classes.Converters
{

    // Converts a boolean true value to a red color otherwise returns nothing
    public class DataGridRowErrorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool boolvalue = (bool)value;

            if (boolvalue)
            {
                return "#FFFFCDCD";
            }
            else
            {
                return "#FFEEFFED";
            }

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException(); 

        }
    }
}
